package com.qiyu.dubbo.config.starter;

import com.qiyu.dubbo.common.DubboService;
import org.apache.dubbo.config.annotation.Reference;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author idea
 * @Date created in 10:25 下午 2020/11/26
 */
@SpringBootApplication
@EnableDubbo
@RestController
public class ConsumerApplication {

    @Reference
    private DubboService dubboService;

    @GetMapping(value = "doRef")
    public String doRef(){
        return dubboService.doTest("");
    }


    public static void main(String[] args) {
        SpringApplication.run(ConsumerApplication.class);
    }
}
